package com.part2.action.common.validator;


  import java.util.Map;

import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
  
  /**
   * <a href="SimpleCachePool.java.html"><b><i>View Source</i></b></a>
   *
   * @author  Brian Wing Shun Chan
   *
   */
public class SimpleCachePool {
  
      public static Object get(String id) {
          return _instance._get(id);
      }
  
      public static void put(String id, Object obj) {
          _instance._put(id, obj);
      }
  
      public static Object remove(String id) {
          return _instance._remove(id);
      }
  
      private SimpleCachePool() {
         _pool = new ConcurrentReaderHashMap(_SIZE);
      }
  
      private Object _get(String id) {
          return _pool.get(id);
      }
  
      private void _put(String id, Object obj) {
          _pool.put(id, obj);
      }
  
      private Object _remove(String id) {
          return _pool.remove(id);
      }
  
      private static SimpleCachePool _instance = new SimpleCachePool();
      private static int _SIZE = 10000;
  
      private Map _pool;
  
  }
